/**
 *autho xf
 * */
function  SurePwd(){
    var oldpwd      = $("#oldpwd").val();//原密码
    var newpwd      = $("#newpwd").val();//新密码
    if (oldpwd == '' || oldpwd == null) {
        alert("原密码不能为空");
        return false;
    }
    if (newpwd == '' || newpwd == null) {
      alert("新密码不能为空");
        return false;
    }
    var reg_pwd= /(?!^[0-9]+$)(?!^[A-z]+$)(?!^[^A-z0-9]+$)^.{6,16}$/;
    if(!reg_pwd.test(newpwd)){
       alert( "6-16个字符，由字母+数字和符号两种以上组合");
        return false;
    }
    $.ajax({
        url: 'update_pwd.html',
        type: "post",
        data: {oldpwd: oldpwd, newpwd: newpwd},
        dataType: "json",
        timeout: 30000,
        success: function (json) {
            if (json.code == 1) {//ok
                alert(json.mess);
                window.location.href = "/web_useraccount.html";
            }
            if (json.code == 2) {//ok
                alert(json.mess);
            }
        }
    });

}

function  SurePwds(){
    var oldpwd      = $("#oldpwd").val();//原密码
    var newpwd      = $("#newpwd").val();//新密码
    if (oldpwd == '' || oldpwd == null) {
        alert("原密码不能为空");
        return false;
    }
    if (newpwd == '' || newpwd == null) {
        alert("新密码不能为空");
        return false;
    }
    var reg_pwd= /(?!^[0-9]+$)(?!^[A-z]+$)(?!^[^A-z0-9]+$)^.{6,16}$/;
    if(!reg_pwd.test(newpwd)){
        alert( "6-16个字符，由字母+数字和符号两种以上组合");
        return false;
    }
    $.ajax({
        url: 'update_pwd.html',
        type: "post",
        data: {oldpwd: oldpwd, newpwd: newpwd},
        dataType: "json",
        timeout: 30000,
        success: function (json) {
            if (json.code == 1) {//ok
                alert(json.mess);
                window.location.href = json.url;
            }
            if (json.code == 2) {//ok
                alert(json.mess);
            }
        }
    });

}



